package org.adkii.core.proxy.statics;

/**
 * @author malingdi
 * @description 代理类，代理RealSubject
 * @date 2025/5/12 21:05
 */
public class ProxySubject implements Subject {
    private Subject realSubject;

    public Subject getRealSubject() {
        return realSubject;
    }

    public void setRealSubject(Subject realSubject) {
        this.realSubject = realSubject;
    }

    public ProxySubject(Subject realSubject) {
        this.realSubject = realSubject;
    }

    @Override
    public void request() {
        System.out.println("Proxy Before");
        realSubject.request();
        System.out.println("Proxy after");
    }
}
